package pl.edu.utp.ga.selections;

import pl.edu.utp.ga.Individual;
import pl.edu.utp.ga.Parents;

public class RandomSelection extends BaseSelection{
	
	public RandomSelection(){
		super();
	}
	
	@Override
	public Parents selectParents() {
		Individual parent1 = population.getIndividual(iteration++);
		Individual parent2 = population.getIndividual(random.nextInt(population.getSize()));
		return new Parents(parent1,parent2);
	}
}
